package com.kude.service;

import java.util.List;

import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.hibernate.criterion.SimpleExpression;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.kude.entity.AbstratAdministrator;
import com.kude.entity.Administrator;
import com.kude.manager.AdministratorManager;
import com.kude.manager.OperException;
import com.kude.util.BeanFactory;

public class AdminitratorService {
	private static final Logger logger = LoggerFactory
			.getLogger(AdminitratorService.class.getName());
	private AdministratorManager administratorManager;

	public final static int NORMAL = 1;
	public final static int FROZEN = 2;

	/**
	 * 根据ID获取用户
	 * 
	 * @param id
	 * @return
	 * @throws OperException
	 */
	public Administrator getAdministrator(int id) throws OperException {
		return administratorManager.get(id);
	}

	/**
	 * 更新用户
	 * 
	 * @param administrator
	 * @throws OperException
	 */
	public void updateAdministrator(Administrator administrator) throws OperException {
		administratorManager.update(administrator);
	}

	public void setAdministratorManager(AdministratorManager administratorManager) {
		this.administratorManager = administratorManager;
	}


}
